Optimal. Leaf size=287 \[ \frac {7 (4 A+i B) x}{128 a^3 c^5}+\frac {A+i B}{192 a^3 c^5 f (i-\tan (e+f x))^3}-\frac {3 i A-2 B}{128 a^3 c^5 f (i-\tan (e+f x))^2}-\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (i-\tan (e+f x))}+\frac {A-i B}{80 a^3 c^5 f (i+\tan (e+f x))^5}-\frac {2 i A+B}{64 a^3 c^5 f (i+\tan (e+f x))^4}-\frac {5 A-i B}{96 a^3 c^5 f (i+\tan (e+f x))^3}+\frac {5 i A}{64 a^3 c^5 f (i+\tan (e+f x))^2}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (i+\tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 287, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3669, 78, 209}
\begin {gather*} -\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (-\tan (e+f x)+i)}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (\tan (e+f x)+i)}-\frac {-2 B+3 i A}{128 a^3 c^5 f (-\tan (e+f x)+i)^2}+\frac {A+i B}{192 a^3 c^5 f (-\tan (e+f x)+i)^3}-\frac {5 A-i B}{96 a^3 c^5 f (\tan (e+f x)+i)^3}-\frac {B+2 i A}{64 a^3 c^5 f (\tan (e+f x)+i)^4}+\frac {A-i B}{80 a^3 c^5 f (\tan (e+f x)+i)^5}+\frac {7 x (4 A+i B)}{128 a^3 c^5}+\frac {5 i A}{64 a^3 c^5 f (\tan (e+f x)+i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 209
Rule 3669
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^5} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(a+i a x)^4 (c-i c x)^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {A+i B}{64 a^4 c^6 (-i+x)^4}+\frac {i (3 A+2 i B)}{64 a^4 c^6 (-i+x)^3}-\frac {3 (7 A+3 i B)}{256 a^4 c^6 (-i+x)^2}+\frac {-A+i B}{16 a^4 c^6 (i+x)^6}+\frac {2 i A+B}{16 a^4 c^6 (i+x)^5}+\frac {5 A-i B}{32 a^4 c^6 (i+x)^4}-\frac {5 i A}{32 a^4 c^6 (i+x)^3}-\frac {5 (7 A+i B)}{256 a^4 c^6 (i+x)^2}+\frac {7 (4 A+i B)}{128 a^4 c^6 \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {A+i B}{192 a^3 c^5 f (i-\tan (e+f x))^3}-\frac {3 i A-2 B}{128 a^3 c^5 f (i-\tan (e+f x))^2}-\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (i-\tan (e+f x))}+\frac {A-i B}{80 a^3 c^5 f (i+\tan (e+f x))^5}-\frac {2 i A+B}{64 a^3 c^5 f (i+\tan (e+f x))^4}-\frac {5 A-i B}{96 a^3 c^5 f (i+\tan (e+f x))^3}+\frac {5 i A}{64 a^3 c^5 f (i+\tan (e+f x))^2}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (i+\tan (e+f x))}+\frac {(7 (4 A+i B)) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{128 a^3 c^5 f}\\ &=\frac {7 (4 A+i B) x}{128 a^3 c^5}+\frac {A+i B}{192 a^3 c^5 f (i-\tan (e+f x))^3}-\frac {3 i A-2 B}{128 a^3 c^5 f (i-\tan (e+f x))^2}-\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (i-\tan (e+f x))}+\frac {A-i B}{80 a^3 c^5 f (i+\tan (e+f x))^5}-\frac {2 i A+B}{64 a^3 c^5 f (i+\tan (e+f x))^4}-\frac {5 A-i B}{96 a^3 c^5 f (i+\tan (e+f x))^3}+\frac {5 i A}{64 a^3 c^5 f (i+\tan (e+f x))^2}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (i+\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.80, size = 280, normalized size = 0.98 \begin {gather*} \frac {\sec ^3(e+f x) (\cos (5 (e+f x))+i \sin (5 (e+f x))) (2100 A+210 (4 A (1+4 i f x)-B (i+4 f x)) \cos (2 (e+f x))-560 (A+i B) \cos (4 (e+f x))-60 A \cos (6 (e+f x))-135 i B \cos (6 (e+f x))-4 A \cos (8 (e+f x))-16 i B \cos (8 (e+f x))+840 i A \sin (2 (e+f x))+210 B \sin (2 (e+f x))+3360 A f x \sin (2 (e+f x))+840 i B f x \sin (2 (e+f x))+1120 i A \sin (4 (e+f x))-280 B \sin (4 (e+f x))+180 i A \sin (6 (e+f x))-45 B \sin (6 (e+f x))+16 i A \sin (8 (e+f x))-4 B \sin (8 (e+f x)))}{15360 a^3 c^5 f (-i+\tan (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.44, size = 212, normalized size = 0.74
method | result | size |
derivativedivides | \(\frac {\frac {5 i A}{64 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {A}{16}+\frac {i B}{16}}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {\frac {5 A}{32}-\frac {i B}{32}}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {35 A}{256}-\frac {5 i B}{256}}{i+\tan \left (f x +e \right )}-\frac {\frac {B}{16}+\frac {i A}{8}}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}+\left (-\frac {7 B}{256}+\frac {7 i A}{64}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {\frac {A}{64}+\frac {i B}{64}}{3 \left (-i+\tan \left (f x +e \right )\right )^{3}}+\left (\frac {7 B}{256}-\frac {7 i A}{64}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )-\frac {-\frac {21 A}{256}-\frac {9 i B}{256}}{-i+\tan \left (f x +e \right )}-\frac {-\frac {B}{32}+\frac {3 i A}{64}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}}{f \,a^{3} c^{5}}\) | \(212\) |
default | \(\frac {\frac {5 i A}{64 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {A}{16}+\frac {i B}{16}}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {\frac {5 A}{32}-\frac {i B}{32}}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {35 A}{256}-\frac {5 i B}{256}}{i+\tan \left (f x +e \right )}-\frac {\frac {B}{16}+\frac {i A}{8}}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}+\left (-\frac {7 B}{256}+\frac {7 i A}{64}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {\frac {A}{64}+\frac {i B}{64}}{3 \left (-i+\tan \left (f x +e \right )\right )^{3}}+\left (\frac {7 B}{256}-\frac {7 i A}{64}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )-\frac {-\frac {21 A}{256}-\frac {9 i B}{256}}{-i+\tan \left (f x +e \right )}-\frac {-\frac {B}{32}+\frac {3 i A}{64}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}}{f \,a^{3} c^{5}}\) | \(212\) |
norman | \(\frac {\frac {7 \left (i B +4 A \right ) x}{128 a c}-\frac {8 i A +3 B}{40 a c f}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{8 a c f}+\frac {79 \left (i B +4 A \right ) \left (\tan ^{3}\left (f x +e \right )\right )}{192 a c f}+\frac {7 \left (i B +4 A \right ) \left (\tan ^{5}\left (f x +e \right )\right )}{15 a c f}+\frac {49 \left (i B +4 A \right ) \left (\tan ^{7}\left (f x +e \right )\right )}{192 a c f}+\frac {7 \left (i B +4 A \right ) \left (\tan ^{9}\left (f x +e \right )\right )}{128 a c f}+\frac {35 \left (i B +4 A \right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{128 a c}+\frac {35 \left (i B +4 A \right ) x \left (\tan ^{4}\left (f x +e \right )\right )}{64 a c}+\frac {35 \left (i B +4 A \right ) x \left (\tan ^{6}\left (f x +e \right )\right )}{64 a c}+\frac {35 \left (i B +4 A \right ) x \left (\tan ^{8}\left (f x +e \right )\right )}{128 a c}+\frac {7 \left (i B +4 A \right ) x \left (\tan ^{10}\left (f x +e \right )\right )}{128 a c}+\frac {\left (-7 i B +100 A \right ) \tan \left (f x +e \right )}{128 a c f}}{\left (1+\tan ^{2}\left (f x +e \right )\right )^{5} a^{2} c^{4}}\) | \(335\) |
risch | \(-\frac {13 i \sin \left (6 f x +6 e \right ) B}{1536 a^{3} c^{5} f}+\frac {7 x A}{32 a^{3} c^{5}}-\frac {{\mathrm e}^{10 i \left (f x +e \right )} B}{2560 a^{3} c^{5} f}-\frac {i {\mathrm e}^{8 i \left (f x +e \right )} A}{256 a^{3} c^{5} f}-\frac {3 \,{\mathrm e}^{8 i \left (f x +e \right )} B}{1024 a^{3} c^{5} f}-\frac {i \sin \left (4 f x +4 e \right ) B}{128 a^{3} c^{5} f}-\frac {5 \cos \left (6 f x +6 e \right ) B}{512 a^{3} c^{5} f}-\frac {9 i \cos \left (6 f x +6 e \right ) A}{512 a^{3} c^{5} f}-\frac {3 i \cos \left (4 f x +4 e \right ) A}{64 a^{3} c^{5} f}+\frac {29 \sin \left (6 f x +6 e \right ) A}{1536 a^{3} c^{5} f}-\frac {5 \cos \left (4 f x +4 e \right ) B}{256 a^{3} c^{5} f}-\frac {i {\mathrm e}^{10 i \left (f x +e \right )} A}{2560 a^{3} c^{5} f}+\frac {7 i \sin \left (2 f x +2 e \right ) B}{256 a^{3} c^{5} f}+\frac {\sin \left (4 f x +4 e \right ) A}{16 a^{3} c^{5} f}-\frac {7 \cos \left (2 f x +2 e \right ) B}{256 a^{3} c^{5} f}+\frac {7 i x B}{128 a^{3} c^{5}}-\frac {21 i \cos \left (2 f x +2 e \right ) A}{256 a^{3} c^{5} f}+\frac {49 \sin \left (2 f x +2 e \right ) A}{256 a^{3} c^{5} f}\) | \(367\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.10, size = 168, normalized size = 0.59 \begin {gather*} \frac {{\left (840 \, {\left (4 \, A + i \, B\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 6 \, {\left (i \, A + B\right )} e^{\left (16 i \, f x + 16 i \, e\right )} - 15 \, {\left (4 i \, A + 3 \, B\right )} e^{\left (14 i \, f x + 14 i \, e\right )} - 140 \, {\left (2 i \, A + B\right )} e^{\left (12 i \, f x + 12 i \, e\right )} - 210 \, {\left (4 i \, A + B\right )} e^{\left (10 i \, f x + 10 i \, e\right )} - 2100 i \, A e^{\left (8 i \, f x + 8 i \, e\right )} - 420 \, {\left (-2 i \, A + B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 30 \, {\left (-4 i \, A + 3 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 10 i \, A - 10 \, B\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{15360 \, a^{3} c^{5} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.91, size = 646, normalized size = 2.25 \begin {gather*} \begin {cases} \frac {\left (- 7263405479023135948800 i A a^{21} c^{35} f^{7} e^{14 i e} e^{2 i f x} + \left (34587645138205409280 i A a^{21} c^{35} f^{7} e^{6 i e} - 34587645138205409280 B a^{21} c^{35} f^{7} e^{6 i e}\right ) e^{- 6 i f x} + \left (415051741658464911360 i A a^{21} c^{35} f^{7} e^{8 i e} - 311288806243848683520 B a^{21} c^{35} f^{7} e^{8 i e}\right ) e^{- 4 i f x} + \left (2905362191609254379520 i A a^{21} c^{35} f^{7} e^{10 i e} - 1452681095804627189760 B a^{21} c^{35} f^{7} e^{10 i e}\right ) e^{- 2 i f x} + \left (- 2905362191609254379520 i A a^{21} c^{35} f^{7} e^{16 i e} - 726340547902313594880 B a^{21} c^{35} f^{7} e^{16 i e}\right ) e^{4 i f x} + \left (- 968454063869751459840 i A a^{21} c^{35} f^{7} e^{18 i e} - 484227031934875729920 B a^{21} c^{35} f^{7} e^{18 i e}\right ) e^{6 i f x} + \left (- 207525870829232455680 i A a^{21} c^{35} f^{7} e^{20 i e} - 155644403121924341760 B a^{21} c^{35} f^{7} e^{20 i e}\right ) e^{8 i f x} + \left (- 20752587082923245568 i A a^{21} c^{35} f^{7} e^{22 i e} - 20752587082923245568 B a^{21} c^{35} f^{7} e^{22 i e}\right ) e^{10 i f x}\right ) e^{- 12 i e}}{53126622932283508654080 a^{24} c^{40} f^{8}} & \text {for}\: a^{24} c^{40} f^{8} e^{12 i e} \neq 0 \\x \left (- \frac {28 A + 7 i B}{128 a^{3} c^{5}} + \frac {\left (A e^{16 i e} + 8 A e^{14 i e} + 28 A e^{12 i e} + 56 A e^{10 i e} + 70 A e^{8 i e} + 56 A e^{6 i e} + 28 A e^{4 i e} + 8 A e^{2 i e} + A - i B e^{16 i e} - 6 i B e^{14 i e} - 14 i B e^{12 i e} - 14 i B e^{10 i e} + 14 i B e^{6 i e} + 14 i B e^{4 i e} + 6 i B e^{2 i e} + i B\right ) e^{- 6 i e}}{256 a^{3} c^{5}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (28 A + 7 i B\right )}{128 a^{3} c^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.03, size = 289, normalized size = 1.01 \begin {gather*} -\frac {\frac {420 \, {\left (-4 i \, A + B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a^{3} c^{5}} + \frac {420 \, {\left (4 i \, A - B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{3} c^{5}} + \frac {10 \, {\left (-308 i \, A \tan \left (f x + e\right )^{3} + 77 \, B \tan \left (f x + e\right )^{3} - 1050 \, A \tan \left (f x + e\right )^{2} - 285 i \, B \tan \left (f x + e\right )^{2} + 1212 i \, A \tan \left (f x + e\right ) - 363 \, B \tan \left (f x + e\right ) + 478 \, A + 163 i \, B\right )}}{a^{3} c^{5} {\left (\tan \left (f x + e\right ) - i\right )}^{3}} + \frac {3836 i \, A \tan \left (f x + e\right )^{5} - 959 \, B \tan \left (f x + e\right )^{5} - 21280 \, A \tan \left (f x + e\right )^{4} - 5095 i \, B \tan \left (f x + e\right )^{4} - 47960 i \, A \tan \left (f x + e\right )^{3} + 10790 \, B \tan \left (f x + e\right )^{3} + 55360 \, A \tan \left (f x + e\right )^{2} + 11230 i \, B \tan \left (f x + e\right )^{2} + 33260 i \, A \tan \left (f x + e\right ) - 5435 \, B \tan \left (f x + e\right ) - 8608 \, A - 667 i \, B}{a^{3} c^{5} {\left (\tan \left (f x + e\right ) + i\right )}^{5}}}{15360 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.73, size = 319, normalized size = 1.11 \begin {gather*} \frac {\frac {3\,B}{40\,a^3\,c^5}+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (-\frac {7\,B}{24\,a^3\,c^5}+\frac {A\,7{}\mathrm {i}}{6\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (-\frac {7\,B}{64\,a^3\,c^5}+\frac {A\,7{}\mathrm {i}}{16\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^7\,\left (\frac {7\,A}{32\,a^3\,c^5}+\frac {B\,7{}\mathrm {i}}{128\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (\frac {35\,A}{96\,a^3\,c^5}+\frac {B\,35{}\mathrm {i}}{384\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (-\frac {77\,B}{320\,a^3\,c^5}+\frac {A\,77{}\mathrm {i}}{80\,a^3\,c^5}\right )-{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {49\,A}{480\,a^3\,c^5}+\frac {B\,49{}\mathrm {i}}{1920\,a^3\,c^5}\right )-\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {61\,A}{160\,a^3\,c^5}+\frac {B\,61{}\mathrm {i}}{640\,a^3\,c^5}\right )+\frac {A\,1{}\mathrm {i}}{5\,a^3\,c^5}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^8+{\mathrm {tan}\left (e+f\,x\right )}^7\,2{}\mathrm {i}+2\,{\mathrm {tan}\left (e+f\,x\right )}^6+{\mathrm {tan}\left (e+f\,x\right )}^5\,6{}\mathrm {i}+{\mathrm {tan}\left (e+f\,x\right )}^3\,6{}\mathrm {i}-2\,{\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,2{}\mathrm {i}-1\right )}+\frac {7\,x\,\left (4\,A+B\,1{}\mathrm {i}\right )}{128\,a^3\,c^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________